package com.edais.persistence;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.edais.domain.BannerConfigTab;
import com.edais.domain.UserActivityKeyCode;
import com.edais.domain.UserActivityUpFrozenInfo;
import com.edais.domain.UserLDActivityInfo;

public interface ActivityMapper {
	
	/**
	 * 获取app版本信息
	 * @return
	 */
	public List getAppVersionInfoList(Map<String, String> params);
	/**
	 * 获取app版本信息总条数
	 * @param params
	 * @return
	 */
	public int getAppVersionInfoListCount(Map<String, String> params);
	
	public List<BannerConfigTab> getBannerList(Map<String, Object> params);
	
	public List getBannerListSEC();
	
	/**
	 * 获取参数列表
	 * @param listStr
	 * @return
	 * @throws Exception
	 */
	public List queryParamName(List<String> keyList);

	/**
	 * 获取K码数据
	 * @param kCode
	 * @return
	 */
	public List<UserActivityKeyCode> findKeyCodeListByParm(Map<String,Object> map);
	
	/**
	 * 根据卡号获取K码数据
	 * @param map
	 * @return
	 */
	public Map<String,Object> findKeyCodeByCardNo(Map<String,Object> map);
	
	/**
	 * 获取K码使用数据
	 * @param map
	 * @return
	 */
	public List<UserLDActivityInfo> findActivityInfoByParm(Map<String, Object> map);
	
	/**
	 * 增加用户K码使用信息
	 * @param keycodeUse
	 * @throws Exception
	 */
	public void addActivityInfo(UserLDActivityInfo activityInfo);

	public void updateActivityInfo(UserLDActivityInfo activityInfo);

	public Map<String, Object> findActivityBidInfo();
	
	public void executeCreateActivityBid(Map<String, Object> map);
	
	/**
	 * 更新活动是否有效
	 * @param keycodeUse
	 * @throws Exception
	 */
	public void updateActivityInfoIsValid(UserLDActivityInfo activityInfo);
	
	/**
	 * 根据条件更新活动历史记录表
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public int updateActivityHistoryInfoByParm(Map<String,Object> map)throws Exception;

	/**
	 * 增加活动历史记录
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public void addActivityHistoryInfo(Map<String,Object> map)throws Exception;

	/**
	 * 查询活动历史记录
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public Map<String,Object> queryActivityHistoryInfoByParm(Map<String,Object> map)throws Exception;
	
	/**
	 * 根据卡号查询用户活动K码一览表
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public UserActivityKeyCode queryUserActivityKeyCodeByCardNo(Map<String, Object> map)throws Exception;
	
	/**
	 * 更新用户活动K码一览表信息
	 * @param userActivityKeyCode
	 * @return
	 * @throws Exception
	 */
	public int updateUserActivityKeyCodeInfo(UserActivityKeyCode userActivityKeyCode)throws Exception;
	
	/**
	 * 增加用户活动K码一览表信息
	 * @param userActivityKeyCode
	 * @throws Exception
	 */
	public void addUserActivityKeyCodeInfo(UserActivityKeyCode userActivityKeyCode)throws Exception;
	
	/**
	 * 根据条件查询 预冻结数据
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public UserActivityUpFrozenInfo queryUserUpForzenInfoByParm(Map<String,Object> map)throws Exception;

	/**
	 * 添加预冻结数据
	 * @param info
	 * @throws Exception
	 */
	public void addUserUpForzenInfo(UserActivityUpFrozenInfo info)throws Exception;
	
	/**
	 * 更新预冻结数据
	 * @param info
	 * @throws Exception
	 */
	public int updateUserUpForzenInfo(UserActivityUpFrozenInfo info)throws Exception;
	
	public List<BannerConfigTab> getAcList(Map<String, Object> map)throws Exception;
	
	public int getAcListCount()throws Exception;

	/**
	* 添加微商推送数据
	* @param  userActivityKeyCode
	* @return void   
	* @throws Exception
	 */
	public void addWbActivityKeyCodeData(Map<String, Object> map)throws Exception;
	
	public int getActivityChannelIdByOrderTime(Date orderTime) throws Exception;
	
	public int updateForLock(Long userId) throws Exception;
}
